<?php
namespace PsiFramework\Applications\AlloMediaAdmin\Classes\Actions\CMS;

import("Classes.Actions.AbstractAction");
import("Classes.Factory.DAOFactory");
import("Classes.Util.Manager.ObjectManager");

use \PsiFramework\Classes\Actions\AbstractAction;
use \PsiFramework\Classes\Factory\DAOFactory;
use \PsiFramework\Classes\Util\Manager\ObjectManager;
use \PsiFramework\Classes\Util\UI\TemplateManager;

/**
 * Bibliotheque
 * Gestion de ma bibliothèque
 *
 * @author Rémi San
 * @version beta
 */

/**
 * Classe de preview d'un thème
 *
 * @package Actions
 */
class PreviewThemeAction extends AbstractAction
{

    /**
     * The main function of the method which is called every time
     * an action is created by the front controller.
     * 
     * @return void
     */
    public function execute()
    {
        parent::execute();
        
        $profileDao = DAOFactory::getDAO('InformationProfile');
        $profile = $profileDao->retrieveByPk($this->_request->getParameter('profile_id'));
        
        $this->_response->setAttribute('profile', $profile);
        
        $this->findForward('success');
    }
}
